3.43 \(\int \frac {\sin (e+f x)}{(a+b \sec ^2(e+f x))^2} \, dx\)

Optimal. Leaf size=84 \[ \frac {3 \sqrt {b} \tan ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {b}}\right )}{2 a^{5/2} f}-\frac {3 \cos (e+f x)}{2 a^2 f}+\frac {\cos ^3(e+f x)}{2 a f \left (a \cos ^2(e+f x)+b\right )} \]

[Out]

-3/2*cos(f*x+e)/a^2/f+1/2*cos(f*x+e)^3/a/f/(b+a*cos(f*x+e)^2)+3/2*arctan(cos(f*x+e)*a^(1/2)/b^(1/2))*b^(1/2)/a
^(5/2)/f

________________________________________________________________________________________

Rubi [A]  time = 0.05, antiderivative size = 84, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {4133, 288, 321, 205} \[ \frac {3 \sqrt {b} \tan ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {b}}\right )}{2 a^{5/2} f}-\frac {3 \cos (e+f x)}{2 a^2 f}+\frac {\cos ^3(e+f x)}{2 a f \left (a \cos ^2(e+f x)+b\right )} \]

Antiderivative was successfully verified.

[In]

Int[Sin[e + f*x]/(a + b*Sec[e + f*x]^2)^2,x]

[Out]

(3*Sqrt[b]*ArcTan[(Sqrt[a]*Cos[e + f*x])/Sqrt[b]])/(2*a^(5/2)*f) - (3*Cos[e + f*x])/(2*a^2*f) + Cos[e + f*x]^3
/(2*a*f*(b + a*Cos[e + f*x]^2))

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 288

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^
n)^(p + 1))/(b*n*(p + 1)), x] - Dist[(c^n*(m - n + 1))/(b*n*(p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^(p + 1), x
], x] /; FreeQ[{a, b, c}, x] && IGtQ[n, 0] && LtQ[p, -1] && GtQ[m + 1, n] &&  !ILtQ[(m + n*(p + 1) + 1)/n, 0]
&& IntBinomialQ[a, b, c, n, m, p, x]

Rule 321

Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(c^(n - 1)*(c*x)^(m - n + 1)*(a + b*x^n
)^(p + 1))/(b*(m + n*p + 1)), x] - Dist[(a*c^n*(m - n + 1))/(b*(m + n*p + 1)), Int[(c*x)^(m - n)*(a + b*x^n)^p
, x], x] /; FreeQ[{a, b, c, p}, x] && IGtQ[n, 0] && GtQ[m, n - 1] && NeQ[m + n*p + 1, 0] && IntBinomialQ[a, b,
 c, n, m, p, x]

Rule 4133

Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*sin[(e_.) + (f_.)*(x_)]^(m_.), x_Symbol] :> With[{ff = F
reeFactors[Cos[e + f*x], x]}, -Dist[ff/f, Subst[Int[((1 - ff^2*x^2)^((m - 1)/2)*(b + a*(ff*x)^n)^p)/(ff*x)^(n*
p), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/2] && IntegerQ[n] && IntegerQ[p
]

Rubi steps

\begin {align*} \int \frac {\sin (e+f x)}{\left (a+b \sec ^2(e+f x)\right )^2} \, dx &=-\frac {\operatorname {Subst}\left (\int \frac {x^4}{\left (b+a x^2\right )^2} \, dx,x,\cos (e+f x)\right )}{f}\\ &=\frac {\cos ^3(e+f x)}{2 a f \left (b+a \cos ^2(e+f x)\right )}-\frac {3 \operatorname {Subst}\left (\int \frac {x^2}{b+a x^2} \, dx,x,\cos (e+f x)\right )}{2 a f}\\ &=-\frac {3 \cos (e+f x)}{2 a^2 f}+\frac {\cos ^3(e+f x)}{2 a f \left (b+a \cos ^2(e+f x)\right )}+\frac {(3 b) \operatorname {Subst}\left (\int \frac {1}{b+a x^2} \, dx,x,\cos (e+f x)\right )}{2 a^2 f}\\ &=\frac {3 \sqrt {b} \tan ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {b}}\right )}{2 a^{5/2} f}-\frac {3 \cos (e+f x)}{2 a^2 f}+\frac {\cos ^3(e+f x)}{2 a f \left (b+a \cos ^2(e+f x)\right )}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 3.14, size = 393, normalized size = 4.68 \[ \frac {\sec ^4(e+f x) (a \cos (2 (e+f x))+a+2 b)^2 \left (-\frac {a^2 \tan ^{-1}\left (\frac {\sqrt {a}-\sqrt {a+b} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {b}}\right )}{b^{3/2}}-\frac {a^2 \tan ^{-1}\left (\frac {\sqrt {a+b} \tan \left (\frac {1}{2} (e+f x)\right )+\sqrt {a}}{\sqrt {b}}\right )}{b^{3/2}}+\frac {\left (a^2+24 b^2\right ) \tan ^{-1}\left (\frac {\sin (e) \tan \left (\frac {f x}{2}\right ) \left (-\sqrt {a}-i \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2}\right )+\cos (e) \left (\sqrt {a}-\sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \tan \left (\frac {f x}{2}\right )\right )}{\sqrt {b}}\right )}{b^{3/2}}+\frac {\left (a^2+24 b^2\right ) \tan ^{-1}\left (\frac {\sin (e) \tan \left (\frac {f x}{2}\right ) \left (-\sqrt {a}+i \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2}\right )+\cos (e) \left (\sqrt {a}+\sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \tan \left (\frac {f x}{2}\right )\right )}{\sqrt {b}}\right )}{b^{3/2}}-\frac {16 \sqrt {a} \cos (e+f x) (a \cos (2 (e+f x))+a+3 b)}{a \cos (2 (e+f x))+a+2 b}\right )}{64 a^{5/2} f \left (a+b \sec ^2(e+f x)\right )^2} \]

Antiderivative was successfully verified.

[In]

Integrate[Sin[e + f*x]/(a + b*Sec[e + f*x]^2)^2,x]

[Out]

((a + 2*b + a*Cos[2*(e + f*x)])^2*(((a^2 + 24*b^2)*ArcTan[((-Sqrt[a] - I*Sqrt[a + b]*Sqrt[(Cos[e] - I*Sin[e])^
2])*Sin[e]*Tan[(f*x)/2] + Cos[e]*(Sqrt[a] - Sqrt[a + b]*Sqrt[(Cos[e] - I*Sin[e])^2]*Tan[(f*x)/2]))/Sqrt[b]])/b
^(3/2) + ((a^2 + 24*b^2)*ArcTan[((-Sqrt[a] + I*Sqrt[a + b]*Sqrt[(Cos[e] - I*Sin[e])^2])*Sin[e]*Tan[(f*x)/2] +
Cos[e]*(Sqrt[a] + Sqrt[a + b]*Sqrt[(Cos[e] - I*Sin[e])^2]*Tan[(f*x)/2]))/Sqrt[b]])/b^(3/2) - (a^2*ArcTan[(Sqrt
[a] - Sqrt[a + b]*Tan[(e + f*x)/2])/Sqrt[b]])/b^(3/2) - (a^2*ArcTan[(Sqrt[a] + Sqrt[a + b]*Tan[(e + f*x)/2])/S
qrt[b]])/b^(3/2) - (16*Sqrt[a]*Cos[e + f*x]*(a + 3*b + a*Cos[2*(e + f*x)]))/(a + 2*b + a*Cos[2*(e + f*x)]))*Se
c[e + f*x]^4)/(64*a^(5/2)*f*(a + b*Sec[e + f*x]^2)^2)

________________________________________________________________________________________

fricas [A]  time = 0.47, size = 201, normalized size = 2.39 \[ \left [-\frac {4 \, a \cos \left (f x + e\right )^{3} - 3 \, {\left (a \cos \left (f x + e\right )^{2} + b\right )} \sqrt {-\frac {b}{a}} \log \left (-\frac {a \cos \left (f x + e\right )^{2} + 2 \, a \sqrt {-\frac {b}{a}} \cos \left (f x + e\right ) - b}{a \cos \left (f x + e\right )^{2} + b}\right ) + 6 \, b \cos \left (f x + e\right )}{4 \, {\left (a^{3} f \cos \left (f x + e\right )^{2} + a^{2} b f\right )}}, -\frac {2 \, a \cos \left (f x + e\right )^{3} - 3 \, {\left (a \cos \left (f x + e\right )^{2} + b\right )} \sqrt {\frac {b}{a}} \arctan \left (\frac {a \sqrt {\frac {b}{a}} \cos \left (f x + e\right )}{b}\right ) + 3 \, b \cos \left (f x + e\right )}{2 \, {\left (a^{3} f \cos \left (f x + e\right )^{2} + a^{2} b f\right )}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)/(a+b*sec(f*x+e)^2)^2,x, algorithm="fricas")

[Out]

[-1/4*(4*a*cos(f*x + e)^3 - 3*(a*cos(f*x + e)^2 + b)*sqrt(-b/a)*log(-(a*cos(f*x + e)^2 + 2*a*sqrt(-b/a)*cos(f*
x + e) - b)/(a*cos(f*x + e)^2 + b)) + 6*b*cos(f*x + e))/(a^3*f*cos(f*x + e)^2 + a^2*b*f), -1/2*(2*a*cos(f*x +
e)^3 - 3*(a*cos(f*x + e)^2 + b)*sqrt(b/a)*arctan(a*sqrt(b/a)*cos(f*x + e)/b) + 3*b*cos(f*x + e))/(a^3*f*cos(f*
x + e)^2 + a^2*b*f)]

________________________________________________________________________________________

giac [A]  time = 0.49, size = 76, normalized size = 0.90 \[ \frac {3 \, b \arctan \left (\frac {a \cos \left (f x + e\right )}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} a^{2} f} - \frac {\cos \left (f x + e\right )}{a^{2} f} - \frac {b \cos \left (f x + e\right )}{2 \, {\left (a \cos \left (f x + e\right )^{2} + b\right )} a^{2} f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)/(a+b*sec(f*x+e)^2)^2,x, algorithm="giac")

[Out]

3/2*b*arctan(a*cos(f*x + e)/sqrt(a*b))/(sqrt(a*b)*a^2*f) - cos(f*x + e)/(a^2*f) - 1/2*b*cos(f*x + e)/((a*cos(f
*x + e)^2 + b)*a^2*f)

________________________________________________________________________________________

maple [A]  time = 0.62, size = 75, normalized size = 0.89 \[ -\frac {b \sec \left (f x +e \right )}{2 f \,a^{2} \left (a +b \left (\sec ^{2}\left (f x +e \right )\right )\right )}-\frac {3 b \arctan \left (\frac {\sec \left (f x +e \right ) b}{\sqrt {a b}}\right )}{2 f \,a^{2} \sqrt {a b}}-\frac {1}{f \,a^{2} \sec \left (f x +e \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(f*x+e)/(a+b*sec(f*x+e)^2)^2,x)

[Out]

-1/2/f*b/a^2*sec(f*x+e)/(a+b*sec(f*x+e)^2)-3/2/f*b/a^2/(a*b)^(1/2)*arctan(sec(f*x+e)*b/(a*b)^(1/2))-1/f/a^2/se
c(f*x+e)

________________________________________________________________________________________

maxima [A]  time = 0.45, size = 70, normalized size = 0.83 \[ -\frac {\frac {b \cos \left (f x + e\right )}{a^{3} \cos \left (f x + e\right )^{2} + a^{2} b} - \frac {3 \, b \arctan \left (\frac {a \cos \left (f x + e\right )}{\sqrt {a b}}\right )}{\sqrt {a b} a^{2}} + \frac {2 \, \cos \left (f x + e\right )}{a^{2}}}{2 \, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)/(a+b*sec(f*x+e)^2)^2,x, algorithm="maxima")

[Out]

-1/2*(b*cos(f*x + e)/(a^3*cos(f*x + e)^2 + a^2*b) - 3*b*arctan(a*cos(f*x + e)/sqrt(a*b))/(sqrt(a*b)*a^2) + 2*c
os(f*x + e)/a^2)/f

________________________________________________________________________________________

mupad [B]  time = 4.56, size = 72, normalized size = 0.86 \[ \frac {3\,\sqrt {b}\,\mathrm {atan}\left (\frac {\sqrt {a}\,\cos \left (e+f\,x\right )}{\sqrt {b}}\right )}{2\,a^{5/2}\,f}-\frac {b\,\cos \left (e+f\,x\right )}{2\,f\,\left (a^3\,{\cos \left (e+f\,x\right )}^2+b\,a^2\right )}-\frac {\cos \left (e+f\,x\right )}{a^2\,f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sin(e + f*x)/(a + b/cos(e + f*x)^2)^2,x)

[Out]

(3*b^(1/2)*atan((a^(1/2)*cos(e + f*x))/b^(1/2)))/(2*a^(5/2)*f) - (b*cos(e + f*x))/(2*f*(a^2*b + a^3*cos(e + f*
x)^2)) - cos(e + f*x)/(a^2*f)

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sin(f*x+e)/(a+b*sec(f*x+e)**2)**2,x)

[Out]

Timed out

________________________________________________________________________________________